package com.ruoyi.logistic.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.NetworkWeightDifference;
import com.ruoyi.logistic.domain.PageInfo;
import com.ruoyi.logistic.domain.vo.NetworkWeightDifferenceVo;
import com.ruoyi.logistic.service.NetworkWeightDifferenceService;
import com.ruoyi.statisticalCenter.domain.ScCashFlow;
import com.ruoyi.statisticalCenter.domain.vo.ScCashFlowVo;
import com.ruoyi.statisticalCenter.service.IScCashFlowService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 现金流水Controller
 *
 * @author pyx
 * @date 2024-02-27
 */
@RestController
@Api(tags = "网点财务-重量差异报表")
@RequestMapping("/network/networkWeightDifference")
public class NetworkWeightDifferenceController extends BaseController {
    @Autowired
    private NetworkWeightDifferenceService networkWeightDifferenceService;

    /**
     * 重量差异报表
     */
    @PostMapping("/list")
    @ApiOperation("分页查询重量差异报表")
    public R list(@RequestBody NetworkWeightDifferenceVo networkWeightDifferenceVo) {
        List<NetworkWeightDifference> list = networkWeightDifferenceService.selectList(networkWeightDifferenceVo);
        if (list == null || list.size() == 0){
            return R.fail("暂无数据");
        }else {
            return R.ok(PageInfo.info(list));
        }
    }
}
